package cn.exrick.xboot.supervisionDepartment.controllerImpl

import cn.exrick.xboot.base.entity.Notice
import cn.exrick.xboot.base.service.INoticeService
import cn.exrick.xboot.core.common.vo.PageVo
import cn.exrick.xboot.core.common.vo.Result
import cn.exrick.xboot.supervisionDepartment.controller.ISupervisionDepartmentController
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.web.bind.annotation.RestController

@RestController
open class NoticeController : ISupervisionDepartmentController.INotice {


    @Autowired
    private lateinit var iNoticeService: INoticeService

    override fun createOrUpdateNotice(notice: Notice): Result<Any?>? {

        return iNoticeService.createOrUpdateNotice(notice)
    }

    override fun removeNotice(ids: Array<out String>): Result<Any?>? {

        return iNoticeService.removeNotice(ids)
    }

    override fun getNoticeList(pageVo: PageVo, type: Int?): Result<MutableMap<String, Any?>>? {

        return iNoticeService.getNoticeList(pageVo, type)
    }

    override fun getNoticeDetail(id: String): Result<Notice>? {

        return iNoticeService.getNoticeDetail(id)
    }


}